package com.service.impl;

import java.util.List;

import com.bean.RulerInfo;
import com.bean.RulerMethod;
import com.bean.RulerRole;
import com.dao.RulerDao;
import com.service.RulerService;

public class RulerServiceImpl implements RulerService{

	RulerDao rulerDao;
	
	public RulerInfo get(Integer id) {
		if(id==null)
			return null;
		return rulerDao.get(id);
	}
	
	@Override
	public List<RulerRole> rulerRole(Long rr) {
		if(rr==null)
			return null;
		return rulerDao.rulerRole(rr.intValue());
	}

	@Override
	public List<RulerInfo> queryRulerList(List<Integer> list) {
		return rulerDao.rulerList(list);
	}
	
	public RulerDao getRulerDao() {
		return rulerDao;
	}

	public void setRulerDao(RulerDao rulerDao) {
		this.rulerDao = rulerDao;
	}

	@Override
	public RulerInfo getByAction(String action) {
		return rulerDao.getByAction(action);
	}
	
	public List<RulerMethod> queryMethds(RulerMethod rulerMethod, Boolean bmap){
		return rulerDao.queryMethds(rulerMethod, bmap);
	}

	@Override
	public List<RulerInfo> query(RulerInfo rulerInfo) {
		return rulerDao.query(rulerInfo);
	}
	@Override
	public List<RulerRole> queryMyRuler(int roleid) {
		return rulerDao.queryMyRuler(roleid);
	}
	
	@Override
	public String delete(int id) {
		return rulerDao.delete(id);
	}

	@Override
	public String add(RulerInfo rulerInfo) {
		
		return rulerDao.add(rulerInfo);
	}

	@Override
	public String update(int id, RulerInfo rulerInfo) {
		return rulerDao.update(id,rulerInfo);
	}

	@Override
	public List<RulerInfo> listTreeRuler() {
		return rulerDao.listTreeRuler();
	}

	@Override
	public List<RulerInfo> list(RulerInfo rulerInfo) {
		return rulerDao.list(rulerInfo);
	}


}
